import { createAction, props } from '@ngrx/store';
import { CartItem } from './cart.reducer';

export const productAdd = createAction(
  '[SHOP] ADD_PRODUCT_TO_CART',
  props<{ cartItem: CartItem }>()
);
export const productSelected = createAction(
  '[SHOP] SELECT_PRODUCT_CHANGE',
  props<{ productSelect: CartItem }>()
);
export const productSelectedAll = createAction(
  '[SHOP] SELECT_PRODUCT_ALL',
  props<{ selectAll: CartItem[] }>()
);
export const productDelete = createAction(
  '[SHOP] DELETE_PRODUCT_ITEM',
  props<{ index: number }>()
);
